#pragma once
namespace graph
{
   namespace details
   {
      inline vertex_id_t edge_real_t::get_target_vertex_id() const
      {
         return target_vertex_;
      } 

      inline high_way_t edge_real_t::get_highway_tag() const
      {
         return highway_;
      }
      
      inline lat_lon_t edge_real_t::get_length() const
      {
         return length_;   
      }
      
      inline vertex_id_t vertex_mutable_t::get_id() const
      {
         return id_;
      }
      
      inline point_t vertex_mutable_t::get_point() const
      {
         return point_;
      }
      
      inline void vertex_mutable_t::set_point(point_t p)
      {
         point_ = p;
      }
            
      inline std::vector<edge_real_t> const & vertex_mutable_t::get_adj_edges() const
      {
         return adj_edges_;
      }
      inline std::vector<edge_real_t> & vertex_mutable_t::get_adj_edges()
      {
         return adj_edges_;
      }
      inline std::vector<edge_real_t> const & vertex_mutable_t::get_in_adj_edges() const
      {
         return adj_in_edges_;
      }
      inline std::vector<edge_real_t>& vertex_mutable_t::get_in_adj_edges()
      {
         return adj_in_edges_;
      }      
      inline vertex_edge_types_t vertex_mutable_t::get_edge_class() const
      {
         return edges_class_;
      }      
      inline void vertex_mutable_t::update_edge_class_inf(high_way_t key)
      {
         if (!key)  
            return;
         char bit = 0x01;
         if (key < 8)
         {
            edges_class_.first = edges_class_.first | (bit << static_cast<int>(key));
         }
         else if (key > 7)
         {
            edges_class_.second = edges_class_.first | (bit << static_cast<int>(key));
         }
      }
   }
   inline vertex_id_t edge_t::get_target_vertex_id() const
   {
      return real_edge_->get_target_vertex_id();
   }
   inline vertex_id_t edge_t::get_source_vertex_id() const
   {
      return source_vertex_id_;
   }
   inline high_way_t edge_t::get_highway() const
   {
      return real_edge_->get_highway_tag();
   }

   inline lat_lon_t edge_t::get_length() const
   {
      return real_edge_->get_length();   
   }

   inline vertex_id_t vertex_t::get_id() const
   {
      return id_;
   }
   inline point_t vertex_t::get_point() const
   {
      return point_;
   }

   inline vertex_edge_types_t vertex_t::get_edges_types() const
   {
      return edges_class_;
   }

   inline size_t vertex_t::get_adj_list_offset() const
   {
      return adj_list_offset_;
   }

   inline size_t vertex_t::get_adj_in_list_offset() const
   {
      return adj_in_list_offset_;
   }
}
